# Manipulación de estructuras
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.3 v purrr 0.3.4
## v tibble 3.1.0 v dplyr 1.0.5
## v tidyr 1.1.3 v stringr 1.4.0
## v readr 1.4.0 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(dplyr)
library(tidyr)
# Para realizar plots
#library(scatterplot3d)
library(ggplot2)
# library(plotly)
random.abb = read.table("Resultados/aleatorioAbb.txt")
random.avl = read.table("Resultados/aleatorioAvl.txt")
random.splay = read.table("Resultados/aleatorioSplay.txt")
random.btree16 = read.table("Resultados/aleatorioBtree16.txt")
random.btree256 = read.table("Resultados/aleatorioBtree256.txt")
random.btree4096 = read.table("Resultados/aleatorioBtree4096.txt")
Experimento_aleatorio <- data.frame(Operacion = integer(),
V1 = double(),
Estructura = factor())
z <- data.frame(Operacion = c(1:1000), V1 = random.abb, Estructura = "ABB")
Experimento_aleatorio <- rbind(Experimento_aleatorio, z)
z <- data.frame(Operacion = c(1:1000), V1 = random.avl, Estructura = "AVL")
Experimento_aleatorio <- rbind(Experimento_aleatorio, z)
z <- data.frame(Operacion = c(1:1000), V1 = random.splay, Estructura = "Splay")
Experimento_aleatorio <- rbind(Experimento_aleatorio, z)
z <- data.frame(Operacion = c(1:1000), V1 = random.btree16, Estructura = "BTree16")
Experimento_aleatorio <- rbind(Experimento_aleatorio, z)
z <- data.frame(Operacion = c(1:1000), V1 = random.btree256, Estructura = "BTree256")
Experimento_aleatorio <- rbind(Experimento_aleatorio, z)
z <- data.frame(Operacion = c(1:1000), V1 = random.btree4096, Estructura = "BTree4096")
Experimento_aleatorio <- rbind(Experimento_aleatorio, z)
mean.ABB <- mean(Experimento_aleatorio[Experimento_aleatorio$Estructura=="ABB",]$V1)
mean.AVL <- mean(Experimento_aleatorio[Experimento_aleatorio$Estructura=="AVL",]$V1)
mean.Splay <- mean(Experimento_aleatorio[Experimento_aleatorio$Estructura=="Splay",]$V1)
mean.BTree16 <- mean(Experimento_aleatorio[Experimento_aleatorio$Estructura=="BTree16",]$V1)
mean.BTree256 <- mean(Experimento_aleatorio[Experimento_aleatorio$Estructura=="BTree256",]$V1)
mean.BTree4096 <- mean(Experimento_aleatorio[Experimento_aleatorio$Estructura=="BTree4096",]$V1)
sd.ABB <- sd(Experimento_aleatorio[Experimento_aleatorio$Estructura=="ABB",]$V1)
sd.AVL <- sd(Experimento_aleatorio[Experimento_aleatorio$Estructura=="AVL",]$V1)
sd.Splay <- sd(Experimento_aleatorio[Experimento_aleatorio$Estructura=="Splay",]$V1)
sd.BTree16 <- sd(Experimento_aleatorio[Experimento_aleatorio$Estructura=="BTree16",]$V1)
sd.BTree256 <- sd(Experimento_aleatorio[Experimento_aleatorio$Estructura=="BTree256",]$V1)
sd.BTree4096 <- sd(Experimento_aleatorio[Experimento_aleatorio$Estructura=="BTree4096",]$V1)
print(paste("ABB: MEAN = ", mean.ABB, ", SD = ", sd.ABB))
## [1] "ABB: MEAN = 0.000930327 , SD = 0.000348079455553439"
print(paste("AVL: MEAN = ", mean.AVL, ", SD = ", sd.AVL))
## [1] "AVL: MEAN = 0.001216248 , SD = 0.000446970595463739"
print(paste("Splay: MEAN = ", mean.Splay, ", SD = ", sd.Splay))
## [1] "Splay: MEAN = 0.001579597 , SD = 0.00051553154837349"
print(paste("BTree16: MEAN = ", mean.BTree16, ", SD = ", sd.BTree16))
## [1] "BTree16: MEAN = 0.000237074 , SD = 0.000103498736767714"
print(paste("BTree256: MEAN = ", mean.BTree256, ", SD = ", sd.BTree256))
## [1] "BTree256: MEAN = 0.000668438 , SD = 0.000169946809543675"
print(paste("BTree4096: MEAN = ", mean.BTree4096, ", SD = ", sd.BTree4096))
## [1] "BTree4096: MEAN = 0.00580662 , SD = 0.00133740359053053"
plot <- ggplot(data = Experimento_aleatorio, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura\nExperimento aleatorio") +
theme(plot.title = element_text(hjust = 0.5))
plot
plot <- ggplot(data = Experimento_aleatorio, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones\nExperimento aleatorio") +
theme(plot.title = element_text(hjust = 0.5))
plot
creciente01.abb = read.table("Resultados/creciente0p1Abb.txt")
creciente01.avl = read.table("Resultados/creciente0p1Avl.txt")
creciente01.splay = read.table("Resultados/creciente0p1Splay.txt")
creciente01.btree16 = read.table("Resultados/creciente0p1Btree16.txt")
creciente01.btree256 = read.table("Resultados/creciente0p1Btree256.txt")
creciente01.btree4096 = read.table("Resultados/creciente0p1Btree4096.txt")
Experimento_creciente0p1 <- data.frame(Operacion = integer(),
V1 = double(),
Estructura = factor())
z <- data.frame(Operacion = c(1:1000), V1 = creciente01.avl, Estructura = "AVL")
Experimento_creciente0p1 <- rbind(Experimento_creciente0p1, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente01.splay, Estructura = "Splay")
Experimento_creciente0p1 <- rbind(Experimento_creciente0p1, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente01.btree16, Estructura = "BTree16")
Experimento_creciente0p1 <- rbind(Experimento_creciente0p1, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente01.btree256, Estructura = "BTree256")
Experimento_creciente0p1 <- rbind(Experimento_creciente0p1, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente01.btree4096, Estructura = "BTree4096")
Experimento_creciente0p1 <- rbind(Experimento_creciente0p1, z)
plot <- ggplot(data = Experimento_creciente0p1, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura, sin ABB\nExperimento Creciente k=0.1") +
theme(plot.title = element_text(hjust = 0.5))
plot
plot <- ggplot(data = Experimento_creciente0p1, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones, sin ABB\nExperimento Creciente k=0.1") +
theme(plot.title = element_text(hjust = 0.5))
plot
z <- data.frame(Operacion = c(1:1000), V1 = creciente01.abb, Estructura = "ABB")
Experimento_creciente0p1 <- rbind(Experimento_creciente0p1, z)
plot <- ggplot(data = Experimento_creciente0p1, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones\nExperimento Creciente k=0.1") +
theme(plot.title = element_text(hjust = 0.5))
plot
mean.ABB <- mean(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="ABB",]$V1)
mean.AVL <- mean(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="AVL",]$V1)
mean.Splay <- mean(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="Splay",]$V1)
mean.BTree16 <- mean(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="BTree16",]$V1)
mean.BTree256 <- mean(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="BTree256",]$V1)
mean.BTree4096 <- mean(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="BTree4096",]$V1)
sd.ABB <- sd(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="ABB",]$V1)
sd.AVL <- sd(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="AVL",]$V1)
sd.Splay <- sd(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="Splay",]$V1)
sd.BTree16 <- sd(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="BTree16",]$V1)
sd.BTree256 <- sd(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="BTree256",]$V1)
sd.BTree4096 <- sd(Experimento_creciente0p1[Experimento_creciente0p1$Estructura=="BTree4096",]$V1)
print(paste("ABB: MEAN = ", mean.ABB, ", SD = ", sd.ABB))
## [1] "ABB: MEAN = 0.105542098 , SD = 0.0597515321009998"
print(paste("AVL: MEAN = ", mean.AVL, ", SD = ", sd.AVL))
## [1] "AVL: MEAN = 0.000647077 , SD = 0.000206721171421105"
print(paste("Splay: MEAN = ", mean.Splay, ", SD = ", sd.Splay))
## [1] "Splay: MEAN = 0.001396472 , SD = 0.0004030516640083"
print(paste("BTree16: MEAN = ", mean.BTree16, ", SD = ", sd.BTree16))
## [1] "BTree16: MEAN = 0.000219507 , SD = 0.00013064235674687"
print(paste("BTree256: MEAN = ", mean.BTree256, ", SD = ", sd.BTree256))
## [1] "BTree256: MEAN = 0.00065965 , SD = 0.000121809955115192"
print(paste("BTree4096: MEAN = ", mean.BTree4096, ", SD = ", sd.BTree4096))
## [1] "BTree4096: MEAN = 0.005747077 , SD = 0.000944166761724297"
creciente05.abb = read.table("Resultados/creciente0p5Abb.txt")
creciente05.avl = read.table("Resultados/creciente0p5Avl.txt")
creciente05.splay = read.table("Resultados/creciente0p5Splay.txt")
creciente05.btree16 = read.table("Resultados/creciente0p5Btree16.txt")
creciente05.btree256 = read.table("Resultados/creciente0p5Btree256.txt")
creciente05.btree4096 = read.table("Resultados/creciente0p5Btree4096.txt")
Experimento_creciente0p5 <- data.frame(Operacion = integer(),
V1 = double(),
Estructura = factor())
z <- data.frame(Operacion = c(1:1000), V1 = creciente05.avl, Estructura = "AVL")
Experimento_creciente0p5 <- rbind(Experimento_creciente0p5, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente05.splay, Estructura = "Splay")
Experimento_creciente0p5 <- rbind(Experimento_creciente0p5, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente05.btree16, Estructura = "BTree16")
Experimento_creciente0p5 <- rbind(Experimento_creciente0p5, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente05.btree256, Estructura = "BTree256")
Experimento_creciente0p5 <- rbind(Experimento_creciente0p5, z)
z <- data.frame(Operacion = c(1:1000), V1 = creciente05.btree4096, Estructura = "BTree4096")
Experimento_creciente0p5 <- rbind(Experimento_creciente0p5, z)
plot <- ggplot(data = Experimento_creciente0p5, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura, sin ABB\nExperimento Creciente k=0.5") +
theme(plot.title = element_text(hjust = 0.5))
plot
plot <- ggplot(data = Experimento_creciente0p5, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones, sin ABB\nExperimento Creciente k=0.5") +
theme(plot.title = element_text(hjust = 0.5))
plot
z <- data.frame(Operacion = c(1:1000), V1 = creciente05.abb, Estructura = "ABB")
Experimento_creciente0p5 <- rbind(Experimento_creciente0p5, z)
plot <- ggplot(data = Experimento_creciente0p5, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones\nExperimento Creciente k=0.5") +
theme(plot.title = element_text(hjust = 0.5))
plot
mean.ABB <- mean(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="ABB",]$V1)
mean.AVL <- mean(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="AVL",]$V1)
mean.Splay <- mean(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="Splay",]$V1)
mean.BTree16 <- mean(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="BTree16",]$V1)
mean.BTree256 <- mean(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="BTree256",]$V1)
mean.BTree4096 <- mean(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="BTree4096",]$V1)
sd.ABB <- sd(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="ABB",]$V1)
sd.AVL <- sd(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="AVL",]$V1)
sd.Splay <- sd(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="Splay",]$V1)
sd.BTree16 <- sd(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="BTree16",]$V1)
sd.BTree256 <- sd(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="BTree256",]$V1)
sd.BTree4096 <- sd(Experimento_creciente0p5[Experimento_creciente0p5$Estructura=="BTree4096",]$V1)
print(paste("ABB: MEAN = ", mean.ABB, ", SD = ", sd.ABB))
## [1] "ABB: MEAN = 0.04265281 , SD = 0.0200915517989425"
print(paste("AVL: MEAN = ", mean.AVL, ", SD = ", sd.AVL))
## [1] "AVL: MEAN = 0.0007641 , SD = 0.000311144035151906"
print(paste("Splay: MEAN = ", mean.Splay, ", SD = ", sd.Splay))
## [1] "Splay: MEAN = 0.001778053 , SD = 0.00055461030713807"
print(paste("BTree16: MEAN = ", mean.BTree16, ", SD = ", sd.BTree16))
## [1] "BTree16: MEAN = 0.000210127 , SD = 7.29064209601405e-05"
print(paste("BTree256: MEAN = ", mean.BTree256, ", SD = ", sd.BTree256))
## [1] "BTree256: MEAN = 0.000659842 , SD = 0.000140676212746977"
print(paste("BTree4096: MEAN = ", mean.BTree4096, ", SD = ", sd.BTree4096))
## [1] "BTree4096: MEAN = 0.005832377 , SD = 0.00123320118635892"
sesgadox.abb = read.table("Resultados/sesgadoxAbb.txt")
sesgadox.avl = read.table("Resultados/sesgadoxAvl.txt")
sesgadox.splay = read.table("Resultados/sesgadoxSplay.txt")
sesgadox.btree16 = read.table("Resultados/sesgadoxBtree16.txt")
sesgadox.btree256 = read.table("Resultados/sesgadoxBtree256.txt")
sesgadox.btree4096 = read.table("Resultados/sesgadoxBtree4096.txt")
Experimento_sesgadox <- data.frame(Operacion = integer(),
V1 = double(),
Estructura = factor())
z <- data.frame(Operacion = c(1:1000), V1 = sesgadox.abb, Estructura = "ABB")
Experimento_sesgadox <- rbind(Experimento_sesgadox, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadox.avl, Estructura = "AVL")
Experimento_sesgadox <- rbind(Experimento_sesgadox, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadox.splay, Estructura = "Splay")
Experimento_sesgadox <- rbind(Experimento_sesgadox, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadox.btree16, Estructura = "BTree16")
Experimento_sesgadox <- rbind(Experimento_sesgadox, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadox.btree256, Estructura = "BTree256")
Experimento_sesgadox <- rbind(Experimento_sesgadox, z)
plot <- ggplot(data = Experimento_sesgadox, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura, sin BTree4096\nExperimento Sesgado f(x) = x") +
theme(plot.title = element_text(hjust = 0.5))
plot
plot <- ggplot(data = Experimento_sesgadox, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones, sin BTree4096\nExperimento Sesgado f(x) = x") +
theme(plot.title = element_text(hjust = 0.5))
plot
#### Gráfico con BTree4096
z <- data.frame(Operacion = c(1:1000), V1 = sesgadox.btree4096, Estructura = "BTree4096")
Experimento_sesgadox <- rbind(Experimento_sesgadox, z)
plot <- ggplot(data = Experimento_sesgadox, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones, sin BTree4096\nExperimento Sesgado f(x) = x") +
theme(plot.title = element_text(hjust = 0.5))
plot
mean.ABB <- mean(Experimento_sesgadox[Experimento_sesgadox$Estructura=="ABB",]$V1)
mean.AVL <- mean(Experimento_sesgadox[Experimento_sesgadox$Estructura=="AVL",]$V1)
mean.Splay <- mean(Experimento_sesgadox[Experimento_sesgadox$Estructura=="Splay",]$V1)
mean.BTree16 <- mean(Experimento_sesgadox[Experimento_sesgadox$Estructura=="BTree16",]$V1)
mean.BTree256 <- mean(Experimento_sesgadox[Experimento_sesgadox$Estructura=="BTree256",]$V1)
mean.BTree4096 <- mean(Experimento_sesgadox[Experimento_sesgadox$Estructura=="BTree4096",]$V1)
sd.ABB <- sd(Experimento_sesgadox[Experimento_sesgadox$Estructura=="ABB",]$V1)
sd.AVL <- sd(Experimento_sesgadox[Experimento_sesgadox$Estructura=="AVL",]$V1)
sd.Splay <- sd(Experimento_sesgadox[Experimento_sesgadox$Estructura=="Splay",]$V1)
sd.BTree16 <- sd(Experimento_sesgadox[Experimento_sesgadox$Estructura=="BTree16",]$V1)
sd.BTree256 <- sd(Experimento_sesgadox[Experimento_sesgadox$Estructura=="BTree256",]$V1)
sd.BTree4096 <- sd(Experimento_sesgadox[Experimento_sesgadox$Estructura=="BTree4096",]$V1)
print(paste("ABB: MEAN = ", mean.ABB, ", SD = ", sd.ABB))
## [1] "ABB: MEAN = 0.000901977 , SD = 0.00036564149679047"
print(paste("AVL: MEAN = ", mean.AVL, ", SD = ", sd.AVL))
## [1] "AVL: MEAN = 0.001204548 , SD = 0.00051011259792183"
print(paste("Splay: MEAN = ", mean.Splay, ", SD = ", sd.Splay))
## [1] "Splay: MEAN = 0.001775908 , SD = 0.000398923232315794"
print(paste("BTree16: MEAN = ", mean.BTree16, ", SD = ", sd.BTree16))
## [1] "BTree16: MEAN = 0.00021806 , SD = 8.16068138826169e-05"
print(paste("BTree256: MEAN = ", mean.BTree256, ", SD = ", sd.BTree256))
## [1] "BTree256: MEAN = 0.000663951 , SD = 0.00019650256450453"
print(paste("BTree4096: MEAN = ", mean.BTree4096, ", SD = ", sd.BTree4096))
## [1] "BTree4096: MEAN = 0.005887827 , SD = 0.00162321232601478"
plot <- ggplot(data = Experimento_sesgadox, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura, sin BTree4096\nExperimento Sesgado f(x) = x") +
theme(plot.title = element_text(hjust = 0.5))
plot
sesgadosqrt.abb = read.table("Resultados/sesgadosqrtAbb.txt")
sesgadosqrt.avl = read.table("Resultados/sesgadosqrtAvl.txt")
sesgadosqrt.splay = read.table("Resultados/sesgadosqrtSplay.txt")
sesgadosqrt.btree16 = read.table("Resultados/sesgadosqrtBtree16.txt")
sesgadosqrt.btree256 = read.table("Resultados/sesgadosqrtBtree256.txt")
sesgadosqrt.btree4096 = read.table("Resultados/sesgadosqrtBtree4096.txt")
Experimento_sesgadosqrt <- data.frame(Operacion = integer(),
V1 = double(),
Estructura = factor())
z <- data.frame(Operacion = c(1:1000), V1 = sesgadosqrt.abb, Estructura = "ABB")
Experimento_sesgadosqrt <- rbind(Experimento_sesgadosqrt, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadosqrt.avl, Estructura = "AVL")
Experimento_sesgadosqrt <- rbind(Experimento_sesgadosqrt, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadosqrt.splay, Estructura = "Splay")
Experimento_sesgadosqrt <- rbind(Experimento_sesgadosqrt, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadosqrt.btree16, Estructura = "BTree16")
Experimento_sesgadosqrt <- rbind(Experimento_sesgadosqrt, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadosqrt.btree256, Estructura = "BTree256")
Experimento_sesgadosqrt <- rbind(Experimento_sesgadosqrt, z)
plot <- ggplot(data = Experimento_sesgadosqrt, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura, sin BTree4096\nExperimento Sesgado f(x)=sqrt(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
plot <- ggplot(data = Experimento_sesgadosqrt, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones, sin BTree4096\nExperimento Sesgado f(x)=sqrt(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
#### Gráfico con BTree4096
z <- data.frame(Operacion = c(1:1000), V1 = sesgadosqrt.btree4096, Estructura = "BTree4096")
Experimento_sesgadosqrt <- rbind(Experimento_sesgadosqrt, z)
plot <- ggplot(data = Experimento_sesgadosqrt, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones\nExperimento Sesgado f(x) = sqrt(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
mean.ABB <- mean(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="ABB",]$V1)
mean.AVL <- mean(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="AVL",]$V1)
mean.Splay <- mean(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="Splay",]$V1)
mean.BTree16 <- mean(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="BTree16",]$V1)
mean.BTree256 <- mean(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="BTree256",]$V1)
mean.BTree4096 <- mean(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="BTree4096",]$V1)
sd.ABB <- sd(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="ABB",]$V1)
sd.AVL <- sd(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="AVL",]$V1)
sd.Splay <- sd(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="Splay",]$V1)
sd.BTree16 <- sd(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="BTree16",]$V1)
sd.BTree256 <- sd(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="BTree256",]$V1)
sd.BTree4096 <- sd(Experimento_sesgadosqrt[Experimento_sesgadosqrt$Estructura=="BTree4096",]$V1)
print(paste("ABB: MEAN = ", mean.ABB, ", SD = ", sd.ABB))
## [1] "ABB: MEAN = 0.000884197 , SD = 0.000360665184855104"
print(paste("AVL: MEAN = ", mean.AVL, ", SD = ", sd.AVL))
## [1] "AVL: MEAN = 0.001200664 , SD = 0.000492648306053576"
print(paste("Splay: MEAN = ", mean.Splay, ", SD = ", sd.Splay))
## [1] "Splay: MEAN = 0.001865372 , SD = 0.000485580139305231"
print(paste("BTree16: MEAN = ", mean.BTree16, ", SD = ", sd.BTree16))
## [1] "BTree16: MEAN = 0.000219922 , SD = 0.000122061029042077"
print(paste("BTree256: MEAN = ", mean.BTree256, ", SD = ", sd.BTree256))
## [1] "BTree256: MEAN = 0.000721659 , SD = 0.000187344833944803"
print(paste("BTree4096: MEAN = ", mean.BTree4096, ", SD = ", sd.BTree4096))
## [1] "BTree4096: MEAN = 0.006016262 , SD = 0.00166918716480422"
plot <- ggplot(data = Experimento_sesgadosqrt, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura, sin BTree4096\nExperimento Sesgado f(x)=sqrt(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
sesgadoln.abb = read.table("Resultados/sesgadolnAbb.txt")
sesgadoln.avl = read.table("Resultados/sesgadolnAvl.txt")
sesgadoln.splay = read.table("Resultados/sesgadolnSplay.txt")
sesgadoln.btree16 = read.table("Resultados/sesgadolnBtree16.txt")
sesgadoln.btree256 = read.table("Resultados/sesgadolnBtree256.txt")
sesgadoln.btree4096 = read.table("Resultados/sesgadolnBtree4096.txt")
Experimento_sesgadoln <- data.frame(Operacion = integer(),
V1 = double(),
Estructura = factor())
z <- data.frame(Operacion = c(1:1000), V1 = sesgadoln.abb, Estructura = "ABB")
Experimento_sesgadoln <- rbind(Experimento_sesgadoln, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadoln.avl, Estructura = "AVL")
Experimento_sesgadoln <- rbind(Experimento_sesgadoln, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadoln.splay, Estructura = "Splay")
Experimento_sesgadoln <- rbind(Experimento_sesgadoln, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadoln.btree16, Estructura = "BTree16")
Experimento_sesgadoln <- rbind(Experimento_sesgadoln, z)
z <- data.frame(Operacion = c(1:1000), V1 = sesgadoln.btree256, Estructura = "BTree256")
Experimento_sesgadoln <- rbind(Experimento_sesgadoln, z)
summary(Experimento_sesgadoln)
## Operacion V1 Estructura
## Min. : 1.0 Min. :0.0001610 Length:5000
## 1st Qu.: 250.8 1st Qu.:0.0005368 Class :character
## Median : 500.5 Median :0.0008460 Mode :character
## Mean : 500.5 Mean :0.0009671
## 3rd Qu.: 750.2 3rd Qu.:0.0014170
## Max. :1000.0 Max. :0.0053300
plot <- ggplot(data = Experimento_sesgadoln, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura\nExperimento Sesgado f(x)=ln(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
plot <- ggplot(data = Experimento_sesgadoln, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones\nExperimento Sesgado f(x)=ln(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
z <- data.frame(Operacion = c(1:1000), V1 = sesgadoln.btree4096, Estructura = "BTree4096")
Experimento_sesgadoln <- rbind(Experimento_sesgadoln, z)
plot <- ggplot(data = Experimento_sesgadoln, aes(x=Operacion, y=V1), inherit.aes = FALSE) +
geom_line(aes(colour=Estructura)) +
xlab("Promedios de cada segmento de iteraciones") +
ylab("Tiempo [s]") +
ggtitle("Tiempo por cada segmento de operaciones\nExperimento Sesgado f(x)=ln(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
mean.ABB <- mean(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="ABB",]$V1)
mean.AVL <- mean(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="AVL",]$V1)
mean.Splay <- mean(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="Splay",]$V1)
mean.BTree16 <- mean(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="BTree16",]$V1)
mean.BTree256 <- mean(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="BTree256",]$V1)
mean.BTree4096 <- mean(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="BTree4096",]$V1)
sd.ABB <- sd(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="ABB",]$V1)
sd.AVL <- sd(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="AVL",]$V1)
sd.Splay <- sd(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="Splay",]$V1)
sd.BTree16 <- sd(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="BTree16",]$V1)
sd.BTree256 <- sd(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="BTree256",]$V1)
sd.BTree4096 <- sd(Experimento_sesgadoln[Experimento_sesgadoln$Estructura=="BTree4096",]$V1)
print(paste("ABB: MEAN = ", mean.ABB, ", SD = ", sd.ABB))
## [1] "ABB: MEAN = 0.000936846 , SD = 0.000389173234036065"
print(paste("AVL: MEAN = ", mean.AVL, ", SD = ", sd.AVL))
## [1] "AVL: MEAN = 0.001194411 , SD = 0.000437156486710277"
print(paste("Splay: MEAN = ", mean.Splay, ", SD = ", sd.Splay))
## [1] "Splay: MEAN = 0.001800395 , SD = 0.000413390017152424"
print(paste("BTree16: MEAN = ", mean.BTree16, ", SD = ", sd.BTree16))
## [1] "BTree16: MEAN = 0.000237688 , SD = 9.81557599390337e-05"
print(paste("BTree256: MEAN = ", mean.BTree256, ", SD = ", sd.BTree256))
## [1] "BTree256: MEAN = 0.000666389 , SD = 0.000177742234657329"
print(paste("BTree4096: MEAN = ", mean.BTree4096, ", SD = ", sd.BTree4096))
## [1] "BTree4096: MEAN = 0.006447387 , SD = 0.00150761245369675"
plot <- ggplot(data = Experimento_sesgadoln, aes(x=Estructura, y=V1, color=Estructura)) +
geom_boxplot() +
xlab("Estructuras") +
ylab("Tiempo [s]") +
ggtitle("Boxplot por cada estructura\nExperimento Sesgado f(x)=ln(x)") +
theme(plot.title = element_text(hjust = 0.5))
plot
A work by cd